package com.afkx.oop.demo7;

/**
 *@InterfaceName USB
 *@Description  TODO
 *@Author Oneby
 *@Date 2025/3/5 8:40
 *@Version 1.0
 */
public interface USB {
    /**
     * @description: 连接
     * @author: Kx
     * @date: 2025/3/5 8:42
     * @param: []
     * @return: void
     **/
    default void connect(USB sub){
        System.out.println(Computer.class.getSimpleName() + "通过USB连接" + sub.getClass().getSimpleName());
        sub.readDate();
        sub.writeDate("hello");
    }

    /**
     * @description: 读取数据
     * @author: Kx
     * @date: 2025/3/5 8:42
     * @param: []
     * @return: void
     **/
    void readDate();

    /**
     * @description: 写入数据
     * @author: Kx
     * @date: 2025/3/5 8:43
     * @param: [Date 需要写入的数据]
     * @return: void
     **/
    void writeDate(String Date);
}
